package com.imooc.business.core.executor.up;

import com.imooc.business.context.DataContext;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author Tim
 * @Description: 装饰者模式体现
 * @Version 1.0
 */
@Slf4j
public class LogEventProcessDecorator implements EventProcess{
    private EventProcess delegate;
    public LogEventProcessDecorator(EventProcess process) {
        this.delegate = process;
    }
    @Override
    public void process(DataContext context) {
        this.delegate.process(context);
        log.info("---- 事件上下文日志 ---- 当前事件处理: {}", context);
    }
}
